package share

import "oc_saas/model/base"

// 路由表
type Route struct {
	base.IDColumn
	Name        string `json:"name" gorm:"column:name;type:varchar(20);size:20;not null"`
	RuleID      uint   `json:"rule_id" gorm:"not null;comment:对应的规则ID"`
	Path        string `json:"path" gorm:"type:varchar(100);size:100;not null;comment:路由路径"`
	Component   string `json:"component" gorm:"type:varchar(100);size:100;comment:路由组件(空的时候为重定向);not null"`
	Icon        string `json:"icon" gorm:"column:icon;type:varchar(20);size:20;not null;comment:图标"`
	Title       string `json:"title" gorm:"column:title;type:varchar(20);size:10;not null;comment:标题"`
	IsLink      string `json:"is_link" gorm:"not null;type:varchar(1000);size:1000;comment:是否为外部链接"`
	IsHide      bool   `json:"is_hide" gorm:"not null;comment:是否隐藏"`
	IsFull      bool   `json:"is_full" gorm:"not null;comment:是否全屏"`
	IsAffix     bool   `json:"is_affix" gorm:"not null;comment:是否固定在导航栏"`
	IsKeepAlive bool   `json:"is_keep_alive" gorm:"not null;comment:是否缓存"`
	Redirect    string `json:"redirect" gorm:"column:redirect;type:varchar(100);size:100;comment:重定向路径;not null"`
	IsHome      bool   `json:"is_home" gorm:"not null;default:0;comment:是否作为首页"`
}
